OPEN TO WRITE

This command will open a file, ready for writing.

  Syntax
OPEN TO WRITE File Number, Filename
  Parameters
File Number
Integer
The file number to open,you can have up to 32 files at the same time, using a file number range of 1 through to 32
Filename
String
The file name to write to

  Returns

This command does not return a value.

  Description

The file must not exist or the command will fail. You can open up to 32 files at the same time, using a file number range of 1 through to 32.

  Example Code
cls
open to write 1,"data.dat"
if file open(1)=1
write byte 1,42
endif
close file 1
do
loop
end
  See also

FILE Commands Menu
Index